import { extend } from 'umi-request';
import { notification } from 'antd';
const baseUrl = process.env.NODE_ENV === 'production' ? '' : '/api';

const request = extend({
  prefix: baseUrl,
  // suffix: '.json',
  timeout: 1000,
  headers: {
    'Content-Type': 'multipart/form-data',
  },
  errorHandler: function(error) {
    /* 异常处理 */
  },
});

export default request;
